/*
 * @Author: your name
 * @Date: 2021-01-21 08:58:53
 * @LastEditTime: 2021-02-07 16:17:20
 * @FilePath: \flutter_study\lib\main.dart
 */
import 'package:flutter/material.dart';
import './pages/scaffold_demo.dart'; // Scaffold 模块
import './pages/router_demo.dart'; // 路由模块
import './pages/from_demo.dart'; // 表单模块
import './pages/button_demo.dart'; // Button 模块
import './pages/compoents.dart'; // 常用组件模块
import './pages/popup_box.dart'; // 弹出框模块

void main() => runApp(MyApp());

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: "Flutter Demo",
      debugShowCheckedModeBanner: false,
      theme: ThemeData(
        primarySwatch: Colors.deepPurple,
        highlightColor: Color.fromRGBO(255, 255, 255, 0.5),
        splashColor: Colors.white70,
      ),
      //   home: Container(
      //     child: ScaffoldDemo(),
      //   ),
      initialRoute: '/popupbox',
      routes: {
        '/': (context) => ScaffoldDemo(),
        '/router': (context) => RouterMain(),
        '/pagedemo': (context) => PageDemo(title: "About"),
        '/form': (context) => FormMain(),
        '/button': (context) => ButtonDemo(),
        '/compoents': (context) => CompoentsDemo(),
        '/popupbox': (context) => PopUpBoxDemo(),
      },
    );
  }
}
